<template>
  <el-dialog
    title="补货详情"
    :visible.sync="dialogVisible"
    :width="flag === 0 ? '50%' : '35%'"
    :close-on-click-modal="false"
  >
    <template v-if="flag === 1">
      <el-table :data="tableData" style="width: 100%" height="300">
        <el-table-column prop="channelCode" label="货道编号" width="180">
        </el-table-column>
        <el-table-column prop="skuName" label="商品" width="180">
        </el-table-column>
        <el-table-column prop="expectCapacity" label="补货数量">
        </el-table-column>
      </el-table>
    </template>
    <template v-if="flag === 0">
      <el-table :data="tableData" style="width: 100%" height="300">
        <el-table-column prop="channelCode" label="货道编号" width="180">
        </el-table-column>
        <el-table-column prop="sku.brandName" label="商品名称" width="180">
        </el-table-column>
        <el-table-column prop="currentCapacity" label="当前数量">
        </el-table-column>
        <el-table-column prop="num" label="还可添加">
          <template #default="{ row }">
            {{ row.maxCapacity - row.currentCapacity }}
          </template>
        </el-table-column>
        <el-table-column prop="maxCapacity" label="补满数量"> </el-table-column>
      </el-table>
    </template>
  </el-dialog>
</template>

<script>
export default {
  name: 'Dkd3BuhuoDetial',

  data () {
    return {
      dialogVisible: false,
      tableData: [],
      flag: 0
    }
  },

  mounted () {},

  methods: {
    handleClose () {}
  }
}
</script>

<style lang="less" scoped>
</style>
